import { defHttp } from '/@/utils/http/axios';
import { ApiCommon } from '../common';

const { CUSTOMER_ADMIN_API } = ApiCommon;

enum API {
  START = '/self-paying/change-meter/create', // 启动流程
  USER_INFO = '/user/info', // 综合业务办理查询账户列表
  INFO = '/user-water-usage/get/info', // 获得用户用水类别
  REPLACE_METER_INFO = '/self-paying/meter', // 获取工单详情
  CONSTR_INFO = '/self-paying/construction/Self-paying', // 打印施工单
}

export const getUserInfoApi = (params: object) =>
  defHttp.get({ url: CUSTOMER_ADMIN_API + API.USER_INFO, params }); // 综合业务办理查询账户列表

// 获取用户用水类别
export const getUserWaterApi = (params) =>
  defHttp.get({ url: CUSTOMER_ADMIN_API + API.INFO, params });

export const startApi = (data) => defHttp.post({ url: CUSTOMER_ADMIN_API + API.START, data });
export const getReplaceMeterInfo = (id) =>
  defHttp.get({ url: CUSTOMER_ADMIN_API + API.REPLACE_METER_INFO + '/' + id });
// 打印施工单
export const getConstrInfo = (id) =>
  defHttp.get({ url: CUSTOMER_ADMIN_API + API.CONSTR_INFO + '/' + id });
